home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
58606
/
58606.xpi
/
chrome
/
translator.jar
/
content
/
preferencesLoader.js
< prev
next >
Wrap
Text File
|
2010-01-06
|
997b
|
45 lines
// declaring jQuery variable
var translatorJQuery = jQuery.noConflict(true);
// initializing package namespace
if(!com) var com = {};
if(!com.igorgladkov) com.igorgladkov = {};
if(!com.igorgladkov.translator) com.igorgladkov.translator = {};
(function(namespace, $)
{
namespace.PreferencesLoader = function()
{
// empty costructor
};
namespace.PreferencesLoader.prototype = {
prefs: null,
load: function()
{
// start prefs manager
this.prefs = new namespace.PrefsManager();
// initialize preferences
var preferences = new namespace.Preferences(this.prefs);
preferences.init();
}
};
// load event listener
$(window).one('load.translator', function() {
var preferencesLoader = new namespace.PreferencesLoader();
preferencesLoader.load();
}, false);
// binding function
Function.prototype.bind = function(o) {
var m = this;
return function() {
return m.apply(o, arguments);
};
}
})(com.igorgladkov.translator, translatorJQuery);